# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

cmake_minimum_required (VERSION 3.13)
set(TARGET_NAME "azure-core-test-fw")
project(azure-core-test-fw LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)

set(
  AZURE_CORE_TEST_HEADER
  inc/azure/core/test/interceptor_manager.hpp
  inc/azure/core/test/network_models.hpp
  inc/azure/core/test/playback_http_client.hpp
  inc/azure/core/test/record_network_call_policy.hpp
  inc/azure/core/test/test_base.hpp
  inc/azure/core/test/test_context_manager.hpp
)

set(
  AZURE_CORE_TEST_SOURCE
  src/private/environment.hpp
  src/private/package_version.hpp
  src/environment.cpp
  src/interceptor_manager.cpp
  src/playback_http_transport.cpp
  src/record_policy.cpp
  src/test_base.cpp
)

add_library (
  azure-core-test-fw
  ${AZURE_CORE_TEST_HEADER}
  ${AZURE_CORE_TEST_SOURCE}
  )

if (MSVC)
  # - C6326: Google comparisons 
  target_compile_options(azure-core-test-fw PUBLIC /wd6326)
endif()

target_include_directories (azure-core-test-fw
  PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
    $<INSTALL_INTERFACE:include/az_core_test>)

# make sure that users can consume the project as a library.
add_library (Azure::Core::Test ALIAS azure-core-test-fw)
target_link_libraries(azure-core-test-fw PRIVATE azure-core gtest)
